package bootloader;

import screen.*;
import misc.*;
import keyboard.*;
import language.*;

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Main extends JFrame {
    private Screen scr = new Screen();
    private VRAM ram = scr.getVRAM();
    private Container c = getContentPane();
    static {
        new File("A").mkdir();
    }
    public Main() {
        initialize();
        scr.println("AirplanDOS 1.0 (Chinese)");
        scr.println("");
        scr.println(Props.displayPath + "\\>_");
    }
    private void disableMouse() {
        Toolkit tk = Toolkit.getDefaultToolkit();
        Image img = tk.getImage("");
        setCursor(tk.createCustomCursor(img, new Point(10, 10), "nothing"));
    }
    private void initialize() {
        setSize(Props.screenWidth(), Props.screenHeight());
        setAlwaysOnTop(true);
        setResizable(false);
        setUndecorated(true);
        setVisible(true);
        setDefaultCloseOperation(3);
        c.setBackground(Color.BLACK);
        c.add(ram);
        addKeyListener(new APDKeyListener(this));
        disableMouse();
        LangEnv.setLangEnv(new LangEnv.Chinese());
    }
    public static void main(String[] args) {
        new Main();
    }
    public Screen getScreen() {
        return scr;
    }
}